package com.gamificationlibrary.gamificationlibrary.badge;

import android.util.Log;

import com.gamificationlibrary.gamificationlibrary.model.Player;

public class BadgeSimpleStraightDays extends BadgeSimple{

	/**
	 * 
	 */
	private static final long serialVersionUID = -8818982301648270861L;

	
	public BadgeSimpleStraightDays( BadgeStateLocked stateLocked, BadgeStateUnlocked stateUnlocked,
			BadgeStateWon stateWon, boolean locked, int numberStraightDays) {
		
		this.setStateLocked(stateLocked);
		this.setStateUnlocked(stateUnlocked);
		this.setStateWon(stateWon);
		this.setAchievements(numberStraightDays);
		if(locked)
		{
		this.setCurrentState(stateLocked);
		}
		else
			this.setCurrentState(stateUnlocked);
	
	}


	@Override
	public boolean checkWon(Player p) {
		// TODO Auto-generated method stub
	
		if(p.getStraightDayscontrib()==this.getAchievements())
		{
			return true;
		}
		else return false;
	}


	@Override
	public String getType() {
		// TODO Auto-generated method stub
		return BadgeSimple.typeStraightDays;
	}

	


	

	
}
